Conversation
Signed-off-by: Alexis Reigel <mail@koffeinfrei.org>
Signed-off-by: Alexis Reigel <mail@koffeinfrei.org>
5e034f9 to
afae342
Compare
|
Is there a linked issue for this? |
Yes: #11 I didn't link it initially as I didn't want to create bias for the discussion in the issue (as I created the MR first, which is not according to you contribution guidelines, as pointed out by you). |
|
Writing the PR first already created a bias. There is no CORS support in any of the function templates. Having this as a default would go against that, if it's to be added, I would suggest it's made strictly opt-in. |
Just to make sure we're on the same page: This PR doesn't add CORS support. It just adds a sinatra route for Having said that, do you think passing |
Add the possibility to handle
OPTIONSrequests as well in the handler.This allows to handle e.g. CORS requests, like the following:
I also extracted the responding logic to a sinatra helper, as the code wasn't very dry.